<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
$return=array();
if($_RQ['op']=='main'){
	if($_RQ['postdata']){
		$postdata=get_postdata();
		plugin('jy_quanhuo')->plugin_setting('basic',$postdata);
		exi('设置成功');
	}
	$plugins =$this->plugins();
	$return['item']=plugin('jy_quanhuo')->plugin_setting('basic');
	$htmls=array(
		'type'=>'edit',
		'desc'=>'管理/绑定设置',
		'tabs'=>$tabs,
		'edit_tab'=>true,
		'edits'=>array(
			array(
				'title'=>'管理员设置',
				'list'=>array(
					array('type'=>'choose','title'=>'管理员UID','name'=>'adminuid','action'=>'core/member.get_member/','choose_title'=>'选择会员','help'=>'便于接收平台高级消息！'),
					array('type'=>'choose','title'=>'客服人员ID','name'=>'kefuid','action'=>'core/member.get_member/','choose_title'=>'选择会员'),
					array('type'=>'choose_many','name'=>'sysmid','title'=>'审核维护员ID','action'=>'core/member.get_member/many/','choose_title'=>'选择会员'),
				)
			),
			array(
				'title'=>'分销绑定设置',
				'list'=>array(
					array('type'=>'radio','title'=>'成为下线时机','name'=>'become_child','options'=>'become_child'),
					array('type'=>'radio','title'=>'分销关系独立','name'=>'become_type','options'=>'become_type','help'=>'[活动独立上下级关系]:每个活动，新分享出去，会产生活动独立的上级关系，根据独立关系来结算佣金'),
					array('type'=>'radio','title'=>'种草免单类型','name'=>'mian_type','options'=>'mian_type'),
				)
			),
		),
	);
	$return['withdraw']=$this->pay_types;
	$return['types']=get_form_types();
	$return['mian_type']=array('0'=>'分享人头','1'=>'分享购买订单数');
	$return['ismust']=array('0'=>'非必填','1'=>'必填');
	$return['pcd_types']=array('0'=>'区/县级圈','1'=>'市级圈','2'=>'省级圈');
	$return['become_type']=array('0'=>'全局统一上下级关系','1'=>'活动独立上下级关系');
	$return['become_child']=array('0'=>'首次点击分享链接/扫码','1'=>'首次下单','2'=>'首次付款');
	$return['htmls']=$htmls;
	exi($return);
}